﻿<%@ Page Language="C#" MasterPageFile="~/Template/Detail.master" AutoEventWireup="true" CodeFile="UserAttendDetail.aspx.cs" Inherits="Page_UserAttendDetail" Title="无标题页" %>
<%@ Register Src="~/Control/TabberHeader.ascx" TagName="TabberHeader" TagPrefix="wsc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

    <script>
    function ChangeDetailView1()
    {
        var height = document.body.clientHeight;
        var infoDetail = document.getElementById("trInfo1");
        if(infoDetail.style.display=='none')
        {
            document.getElementById("imgExpand1").src="../Images/Icon/icon-collapse.png" ;
	        infoDetail.style.display='';		
        }
        else
        {
	        document.getElementById("imgExpand1").src="../Images/Icon/icon-expand.png" ;
	        infoDetail.style.display='none';
        }
        PageResize();
    }
    
    function ChangeDetailView2()
    {
        var height = document.body.clientHeight;
        var infoDetail = document.getElementById("trInfo2");
        if(infoDetail.style.display=='none')
        {
            document.getElementById("imgExpand2").src="../Images/Icon/icon-collapse.png" ;
	        infoDetail.style.display='';		
        }
        else
        {
	        document.getElementById("imgExpand2").src="../Images/Icon/icon-expand.png" ;
	        infoDetail.style.display='none';
        }
        PageResize();
    }
    function refreshParent() {
        try {
            window.opener.document.getElementById('ctl00$ListToolBarPlaceHolder$btnRefresh').click();
        }
        catch (e) {
        }
    }
    function openChooseItem()
    {
        var width = 560;
        var height = 420;
        window.open("ChooseAttendItem.aspx?ID=<%=AttendID %>&NoCache="+ Math.random(), "newwindow", 'width='+width+',height='+height+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,left='+(screen.width-width)/2+',top='+(screen.height-height)/2);
    } 
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ListToolBarPlaceHolder" Runat="Server">
    <div style="display: none">
        <asp:TextBox ID="tbLeaderCode" runat="server"></asp:TextBox>
        <asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" />
    </div>
<%--    <table cellspacing="2" cellpadding="0" border="0" id="tblOperator" runat="server">
        <tr>
            <td class="ToolMenu" width="60" id="tdEdit" runat="server">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="openChooseItem();">
                    <span><img src="../Images/Icon/object/Dataset-edit.gif" /></span><span>勾选值班安排</span>
                </div>
            </td>
        </tr>
    </table>--%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="TitleContentPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="InfoContentPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="TextContentPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="TabberContentPlaceHolder" Runat="Server">
    <wsc:TabberHeader ID="thInfo" runat="server" DivID="div1" Title="值班清单" Selected="true" />
    <wsc:TabberHeader ID="thForm" runat="server" DivID="div2" Title="详情内容" />
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="Div1ContentPlaceHolder" Runat="Server">
    <table cellspacing="0" cellpadding="0" border="0" class="" width="100%"">
        <tr>
            <td class="DetailHeader">
                <table cellspacing="0" cellpadding="0" border="0" width="100%">
                    <tr>
                        <td class="ArticleTitle">
                            <asp:Literal ID="ltTitle" runat="server"></asp:Literal>
                        </td>
                        <td width="14">
                            <a href="#">
                                <img src="../Images/Icon/icon-collapse.png" alt="字段" style="cursor: pointer;" onclick="ChangeDetailView1();"
                                    id="imgExpand1" /></a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr id="trInfo1">
            <td>
                <table id="tblDetail1" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="DetailTitle">
                            <div class="fixWidth2">
                                <a class="blue-01"><strong>值班名称：</strong></a>
                                <asp:Literal ID="ltName" runat="server"></asp:Literal></div>
                        </td>
                    </tr>
                    <tr>
                        <td class="DetailTitle">
                            <div class="fixWidth2">
                                <a class="blue-01"><strong>值班地点：</strong></a>
                                <asp:Literal ID="ltPlace" runat="server"></asp:Literal></div>
                        </td>
                    </tr>
                    <tr>
                        <td class="DetailTitle">
                            <div class="fixWidth2">
                                <a class="blue-01"><strong>创建时间：</strong></a>
                                <asp:Literal ID="ltCreateTime" runat="server"></asp:Literal></div>
                        </td>
                    </tr>
                    <tr>
                        <td class="DetailTitle">
                            <div class="fixWidth2">
                                <a class="blue-01"><strong>值班内容：</strong></a>
                                </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td valign="top">
                <div id="MainContent1" class="Content ScrollDiv">
                    <asp:Literal ID="ltDescription" runat="server"></asp:Literal>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="Div2ContentPlaceHolder" Runat="Server">
    <table cellspacing="0" cellpadding="0" border="0" class="" width="100%">
        <tr>
            <td class="DetailHeader">
                <table cellspacing="0" cellpadding="0" border="0" width="100%">
                    <tr>
                        <td class="ArticleTitle">
                            <asp:Literal ID="ltTitle2" runat="server"></asp:Literal>
                        </td>
                        <td width="14">
                            <a href="#">
                                <img src="../Images/Icon/icon-collapse.png" alt="字段" style="cursor: pointer;" onclick="ChangeDetailView2();"
                                    id="imgExpand2" /></a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr id="trInfo2">
            <td>
                <table id="tblDetail2" width="100%" border="0" cellspacing="0" cellpadding="0">
                   <tr>
                        <td class="DetailTitle" colspan="3">
                            <div class="fixWidth2">
                                <a class="blue-01"><strong>&nbsp;值班名称：</strong></a>
                                <asp:Literal ID="ltName2" runat="server"></asp:Literal></div>
                        </td>
                    </tr>
                    <tr>
                        <td class="DetailTitle" colspan="3">
                            <div class="fixWidth2">
                                <a class="blue-01"><strong>&nbsp;值班地点：</strong></a>
                                <asp:Literal ID="ltPlace2" runat="server"></asp:Literal></div>
                        </td>
                    </tr>
                    <tr>
                        <td class="DetailTitle" colspan="3">
                            <div class="fixWidth2">
                                <hr />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="DetailTitle">
                            <div class="fixWidth2"  >
                                <a class="blue-01"><strong>&nbsp;值班日期</strong></a>
                            </div>
                        </td>
                       <td class="DetailTitle">
                            <div class="fixWidth2">
                                <a class="blue-01"><strong>&nbsp;值班时间</strong></a>
                            </div>
                        </td>
                        <td class="DetailTitle">
                            <div class="fixWidth2" >
                                <a class="blue-01" ><strong>&nbsp;值班人员</strong></a>
                            </div>
                        </td>
                    </tr>
                     <asp:Repeater ID="rptItemList" runat="server" >
                        <ItemTemplate>
                            <tr id="TableRow_<%# Container.ItemIndex%>"  class="Normal" oldclass="Normal"
                                onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)">
                               <td class="DetailTitle">
                                   <div class="fixWidth2" >
                                        &nbsp;<%# ((DateTime)DataBinder.Eval(Container.DataItem, "AttendDate")).ToString("yy-MM-dd")%>
                                   </div>
                                </td>
                                <td class="DetailTitle">
                                    <div class="fixWidth2" >
                                        &nbsp;<%# ((DateTime)DataBinder.Eval(Container.DataItem, "AttendTimeStart")).ToString("HH:mm至") + ((DateTime)DataBinder.Eval(Container.DataItem, "AttendTimeEnd")).ToString("HH:mm")%>
                                    </div>
                                </td>
                                <td class="DetailTitle">
                                    <div class="fixWidth2" >
                                        &nbsp;<asp:Label ID="labUser" runat="server"></asp:Label>
                                    </div>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>                    
                </table>                    
            </td>
        </tr>     
    </table>
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="Div3ContentPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content10" ContentPlaceHolderID="Div4ContentPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content11" ContentPlaceHolderID="Div5ContentPlaceHolder" Runat="Server">
</asp:Content>

